<?php
namespace App\Models\Garage;

class User extends BaseModel
{
    protected $table = 'beesoft_users';
    protected $fillable = [
        'name',
        'email',
        'phone',
        'password',
    ];
    protected $hidden = [
        'password',
        'remember_token',
    ];
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];

    public static function getTypes() {
        return [
            1 => '乘用车',
            2 => '商用车（≤9.6）',
            3 => '商用车（>9.6）',
            4 => '工程车',
        ];
    }

    public static function getUsers() {
        return self::pluck('username', 'id')->toArray();
    }
}
